package com.market.service.impl;

import com.market.entity.SendBackDetail;
import com.market.mapper.SendBackDetailMapper;
import com.market.service.SendBackDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SendBackDetailServiceImpl implements SendBackDetailService {
    @Autowired
    private SendBackDetailMapper sendBackDetailMapper;

    //增加退货单详情记录
    @Override
    public boolean addSendBackDetail(SendBackDetail sendBackDetail) {
        if (sendBackDetailMapper.insertSendBackDetail(sendBackDetail)==1){
            return true;
        }
        return false;
    }

    //查询一个退货单详情
    @Override
    public SendBackDetail querySendBackDetail(int sendBackDetailId) {
        SendBackDetail sendBackDetail = sendBackDetailMapper.selectSendBackDetail(sendBackDetailId);
        return sendBackDetail;
    }
}
